<%@page import="java.util.*"%>
<%@page import="cn.school.servies.*,cn.school.entity.*,java.text.*"%>

<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
<form action="addstudent.jsp" method="post">
<p>

	<label>姓名</label>
	<input type="text" required name="sname"/>
	
	</p>
	<p>
	<label>性别</label>
	<input type="checkbox"  name="sex" value="男"/>男
	<input type="checkbox"  name="sex" value="女"/>女
	</p>
	<p>
	<label>电话</label>
	<input type="text" required name="telephone"/>
	</p>
	<p>
	<label>qq</label>
	<input type="text" required name="qq"/>
	</p>
	<p>
	<label>微信</label>
	<input type="text" required name="wechat"/>
	</p>
	<p>
	<label>年级</label>
	
	<select required name="gradeid">
	<%
	StudentSerive ss=new StudentSerive();
	List<Grade> list=ss.findAll();
	for(Grade g:list){
	%>
	<option><%=g.getId() %></option>
	<%} %>
	</select>
	</p>
	<p>
	<label>入学日期</label>
	<input type="text" required name="enterdate"/>
	</p>
	<p>
	<label>来自哪个城市</label>
	<input type="text" required name="fromcity"/>
	</p>
	<p>
	<label>生日</label>
	<input type="text" required name="birthday"/>
	</p>
	<p>
	<label>地址</label>
	<input type="text" required name="address"/>
	</p>
	<p>
	<label>密码</label>
	<input type="text" required name="pass"/>
	</p>
	<p>
    <input type="submit" value="新增"/>
   </p>
</form>
</body>
</html>